package com.lagou.k8sdemo.controller;

import com.lagou.k8sdemo.po.TJob;
import com.lagou.k8sdemo.service.JobService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: Hugh
 * @Date: 2020/11/28
 */

@RestController
@EnableAutoConfiguration
@RequestMapping(value = "/job")
public class JobController {

    @Autowired
    private JobService jobService;

    @RequestMapping(value = "/getAll")
    public List<TJob> getJobs() throws Exception {
        return jobService.selectAll();
    }

}
